home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / maqlnf30 / zipand~1.txt < prev    next >
Encoding:
Text File  |  1999-02-03  |  33.3 KB  |  780 lines

  1. These are the Zip and Unzip options to be used in the BW Zip Compress OCX
  2.  
  3. The sample application distributed with the OCX already have the most used commands inside it
  4.  
  5. Notice that not all the arguments can be used in the OCX , but you is welcome to test all
  6.  
  7. Zip and Unzip Options
  8.  
  9. These are the options to be passed to the Zip and Unzip functions using the Options argument , these arguments derived from the zip.exe and unzip.exe files by Infozip.
  10.  
  11.  
  12. ZIP OPTIONS
  13.  
  14.        -A     Adjust self-extracting executable archive.  A self-
  15.           extracting   executable    archive      is  created  by
  16.           prepending the SFX stub to an existing archive. The
  17.           -A  option  tells     zip  to adjust the entry offsets
  18.           stored in the archive to    take  into  account  this
  19.           "preamble" data.
  20.  
  21.             -b path
  22.           Use  the    specified  path     for  the  temporary  archive. For example:
  23.  
  24.             -b /tmp stuff *
  25.  
  26.           will put the temporary zip archive in the directory
  27.  
  28.       /tmp,  copying over stuff.zip to the current direc-
  29.           tory when done. This option  is  only  useful  when
  30.           updating    an  existing archive, and the file system
  31.           containing this old archive does    not  have  enough
  32.           space to hold both old and new archives at the same
  33.           time.
  34.  
  35.        -c     Add one-line comments for each file.   File  opera-
  36.           tions  (adding,  updating)  are done first, and the
  37.           user is then prompted for a  one-line  comment  for
  38.  
  39.       each  file.   Enter the comment followed by return,
  40.           or just return for no comment.
  41.  
  42.        -d     Remove (delete) entries from a  zip  archive.   For
  43.  
  44.       example:
  45.  
  46.             -d foo foo/tom/junk foo/harry/\* \*.o
  47.  
  48.           will  remove  the     entry    foo/tom/junk,  all of the
  49.           files that start with foo/harry/, and  all  of  the
  50.           files  that  end    with .o (in any path).    Note that
  51.           shell pathname expansion has  been  inhibited  with
  52.  
  53.       backslashes,  so    that  zip  can see the asterisks,
  54.           enabling zip to match on the contents  of     the  zip
  55.           archive  instead    of  the     contents  of the current
  56.           directory.
  57.  
  58.           Under MSDOS, -d is case sensitive when  it  matches
  59.           names  in the zip archive.  This requires that file
  60.           names be entered in upper case if they were  zipped
  61.           by PKZIP on an MSDOS system.
  62.  
  63.        -D     Do not create entries in the zip archive for direc-
  64.  
  65.       tories.  Directory entries are created  by  default
  66.           so  that    their  attributes can be saved in the zip
  67.           archive.
  68.  
  69.        -e     Encrypt the contents of the  zip archive using    a
  70.           password    which  is  entered  on the  terminal  in
  71.           response to a prompt (this will not be  echoed;  if
  72.           standard    error is not a tty, zip will exit with an
  73.           error).  The password prompt is  repeated     to  save
  74.           the user from typing errors.
  75.  
  76.        -f     Replace  (freshen)  an  existing    entry  in the zip
  77.           archive only if it has been modified more     recently
  78.           than the version already in the zip archive; unlike
  79.           the update option (-u) this will not add files that
  80.           are not already in the zip archive.  For example:
  81.  
  82.              -f foo
  83.  
  84.           This  command should be run from the same directory
  85.           from which the original zip command was run,  since
  86.           paths stored in zip archives are always relative.
  87.  
  88.       Note  that  the  timezone     environment  variable TZ
  89.           order  for  the -f , -u and -o options to work cor-
  90.           rectly.
  91.  
  92.           The reasons behind this  are  somewhat  subtle  but
  93.           have  to    do with the differences between the Unix-
  94.           format file times (always in GMT) and most  of  the
  95.           other operating systems (always local time) and the
  96.           necessity to compare the two.  A typical    TZ  value
  97.           is  ``MET-1MEST''     (Middle European time with auto-
  98.  
  99.       matic adjustment    for  ``summertime''  or     Daylight
  100.           Savings Time).
  101.  
  102.        -F     Fix  the    zip  archive.  This option can be used if
  103.           some portions of the archive are missing. It is not
  104.           guaranteed  to  work,  so you MUST make a backup of
  105.           the original archive first.
  106.  
  107.           When doubled as in -FF the compressed  sizes  given
  108.           inside  the damaged archive are not trusted and zip
  109.           scans for special signatures to identify the limits
  110.  
  111.       between  the archive members. The single -F is more
  112.           reliable if the archive is not  too  much     damaged,
  113.           for  example  if it has only been truncated, so try
  114.           this option first.
  115.  
  116.           Neither option will recover archives that have been
  117.           incorrectly  transferred    in  ascii mode instead of
  118.           binary. After the repair, the -t    option    of  unzip
  119.           may show that some files have a bad CRC. Such files
  120.           cannot be recovered; you can remove them    from  the
  121.  
  122.       archive using the -d option of zip.
  123.  
  124.        -g     Grow (append to) the specified zip archive, instead
  125.           of creating a new one. If this operation fails, zip
  126.           attempts    to  restore  the  archive to its original
  127.           state. If the restoration fails, the archive  might
  128.           become  corrupted.  This    option    is  ignored  when
  129.           there's no existing archive or when  at  least  one
  130.           archive member must be updated or deleted.
  131.  
  132.        -h     Display the zip help information (this also appears
  133.  
  134.       if zip is run with no arguments).
  135.  
  136.        -i files
  137.           Include only the specified files, as in:
  138.  
  139.              -r foo . -i \*.c
  140.  
  141.           which will include only the files that end in .c in
  142.           the current directory and its subdirectories. (Note
  143.           for PKZIP users: the equivalent command is
  144.  
  145.              pkzip -rP foo *.c
  146.  
  147.           PKZIP does not allow recursion in directories other
  148.           than  the     current  one.)     The backslash avoids the
  149.           shell  filename  substitution,  so  that    the  name
  150.  
  151.       matching    is performed by zip at all directory lev-
  152.           els.
  153.  
  154.           Also possible:
  155.  
  156.          -r foo     . -i@include.lst
  157.  
  158.           which will only include the files     in  the  current
  159.           directory     and  its  subdirectories  that match the
  160.           patterns in the file include.lst.
  161.  
  162.        -I     Don't scan through  Image     files.     This  option  is
  163.           available     on  Acorn  RISC  OS only; when used, zip
  164.           will not consider Image files (eg.  DOS  partitions
  165.  
  166.       or Spark archives when SparkFS is loaded) as direc-
  167.           tories but will store them as single files.
  168.  
  169.           For example, if you have SparkFS loaded, zipping    a
  170.           Spark archive will result in a zipfile containing a
  171.           directory (and its content)  while  using     the  'I'
  172.           option  will result in a zipfile containing a Spark
  173.           archive. Obviously this second case  will     also  be
  174.           obtained    (without the 'I' option) if SparkFS isn't
  175.  
  176.       loaded.
  177.  
  178.        -j     Store just the name  of  a  saved file  (junk  the
  179.           path),   and  do    not  store  directory  names.  By
  180.           default, zip will store the full path (relative  to
  181.           the current path).
  182.  
  183.        -J     Strip any prepended data (e.g. a SFX stub) from the
  184.           archive.
  185.  
  186.        -k     Attempt to convert the names and paths  to  conform
  187.           to  MSDOS, store only the MSDOS attribute (just the
  188.           user write attribute from UNIX), and mark the entry
  189.  
  190.       as  made    under MSDOS (even though it was not); for
  191.           compatibility with PKUNZIP under MSDOS which cannot
  192.           handle certain names such as those with two dots.
  193.  
  194.        -l     Translate     the  Unix  end-of-line character LF into
  195.           the MSDOS convention CR LF. This option should  not
  196.           be  used    on binary files.  This option can be used
  197.           on Unix if the zip file  is  intended  for  PKUNZIP
  198.           under  MSDOS. If the input files already contain CR
  199.  
  200.       LF, this option adds an extra CR. This ensure  that
  201.           unzip -a on Unix will get back an exact copy of the
  202.           original file, to undo the effect of zip -l.
  203.  
  204.        -ll    Translate the MSDOS end-of-line CR LF into Unix LF.
  205.           This  option  should  not     be used on binary files.
  206.  
  207.           This option can be used on MSDOS if the zip file is
  208.           intended for unzip under Unix.
  209.  
  210.        -L     Display the zip license.
  211.  
  212.        -m     Move  the     specified  files  into     the zip archive;
  213.  
  214.       actually, this deletes the target directories/files
  215.           after making the specified zip archive. If a direc-
  216.           tory becomes empty after removal of the files,  the
  217.           directory     is  also  removed. No deletions are done
  218.           until zip has created the     archive  without  error.
  219.           This  is    useful    for conserving disk space, but is
  220.           potentially dangerous so it is recommended  to  use
  221.           it  in  combination  with     -T  to     test the archive
  222.  
  223.       before removing all input files.
  224.  
  225.        -n suffixes
  226.           Do not attempt to compress  files     named    with  the
  227.           given  suffixes.     Such files are simply stored (0%
  228.           compression) in the output zip file,  so    that  zip
  229.           doesn't  waste  its  time     trying to compress them.
  230.           The suffixes are    separated  by  either  colons  or
  231.           semicolons.  For example:
  232.  
  233.           -rn .Z:.zip:.tiff:.gif:.snd  foo foo
  234.  
  235.           will  copy  everything  from  foo into foo.zip, but
  236.  
  237.       will store any files that end in .Z,  .zip,  .tiff,
  238.           .gif,  or     .snd  without    trying    to  compress them
  239.           (image and sound files often have     their    own  spe-
  240.           cialized    compression  methods).     By  default, zip
  241.           does not compress files with extensions in the list
  242.           .Z:.zip:.zoo:.arc:.lzh:.arj.  Such files are stored
  243.           directly in the output  archive.     The  environment
  244.           variable    ZIPOPT    can be used to change the default
  245.  
  246.       options. For example under Unix with csh:
  247.  
  248.              setenv ZIPOPT "-n .gif:.zip"
  249.  
  250.           To attempt compression on all files, use:
  251.  
  252.              zip -n : foo
  253.  
  254.           The maximum compression  option  -9  also     attempts
  255.           compression on all files regardless of extension.
  256.  
  257.           On  Acorn RISC OS systems the suffixes are actually
  258.           filetypes (3 hex digit  format).    By  default,  zip
  259.           does  not compress files with filetypes in the list
  260.  
  261.       DDC:D96:68E (i.e. Archives, CFS files  and  PackDir
  262.           files).
  263.  
  264.        -N     Save  Amiga filenotes as zipfile comments. They can
  265.           be restored by using the -N option of  unzip.  This
  266.  
  267.           option  is  available  on     the Amiga only. If -c is
  268.           used also, you are prompted for comments    only  for
  269.           those files that do not have filenotes.
  270.  
  271.        -o     Set  the "last modified" time of the zip archive to
  272.           the latest  (oldest)  "last  modified"  time  found
  273.  
  274.       among  the entries in the zip archive.  This can be
  275.           used without any other operations, if desired.  For
  276.           example:
  277.  
  278.        -o foo
  279.  
  280.           will  change  the     last modified time of foo.zip to
  281.           the latest time of the entries in foo.zip.
  282.  
  283.        -q     Quiet mode; eliminate  informational  messages  and
  284.           comment  prompts.      (Useful,  for example, in shell
  285.           scripts and background tasks).
  286.  
  287.        -r     Travel the  directory  structure    recursively;  for
  288.           example:
  289.  
  290.                -r foo foo
  291.  
  292.           In  this case, all the files and directories in foo
  293.           are saved in a zip archive named foo.zip, including
  294.           files  with  names  starting  with  ".",    since the
  295.  
  296.       recursion does not use the shell's  file-name  sub-
  297.           stitution mechanism.  If you wish to include only a
  298.           specific subset of the files in directory     foo  and
  299.           its  subdirectories,  use     the -i option to specify
  300.           the pattern of files to be  included.   You  should
  301.           not  use    -r with the name ".*", since that matches
  302.           ".."  which will    attempt     to  zip  up  the  parent
  303.           directory (probably not what was intended).
  304.  
  305.        -R     Travel the directory structure recursively starting
  306.           at the current directory; for example:
  307.  
  308.           -R foo *.c
  309.  
  310.           In this case, all the files  matching  *.c  in  the
  311.           tree  starting  at the current directory are stored
  312.           into a zip archive named foo.zip.     Note  for  PKZIP
  313.           users: the equivalent command is
  314.  
  315.              pkzip -rP foo *.c
  316.  
  317.        -S     Include  system  and  hidden  files. This option is
  318.           effective on some systems only; it  is  ignored  on
  319.  
  320.       Unix.
  321.  
  322.        -t mmddyyyy
  323.           Do not operate on files modified prior to the spec-
  324.           ified date, where mm is the month (0-12), dd is the
  325.           day of the month (1-31), and yyyy is the year.  For
  326.           example:
  327.  
  328.            -rt 12071991 infamy foo
  329.  
  330.           will add all the files in foo and     its  subdirecto-
  331.           ries that were last modified on or after 7 December
  332.           1991, to the zip archive infamy.zip.
  333.  
  334.        -tt mmddyyyy
  335.           Do not operate on files modified after  or  at  the
  336.  
  337.       specified date, where mm is the month (0-12), dd is
  338.           the day of the month (1-31), and yyyy is the  year.
  339.           For example:
  340.  
  341.               -rtt 11301995 infamy foo
  342.  
  343.           will  add     all the files in foo and its subdirecto-
  344.           ries that were last modified before the 30 November
  345.           1995, to the zip archive infamy.zip.
  346.  
  347.        -T     Test  the     integrity  of    the  new zip file. If the
  348.           check fails, the old  zip     file  is  unchanged  and
  349.  
  350.       (with the -m option) no input files are removed.
  351.  
  352.        -u     Replace  (update)     an  existing  entry  in  the zip
  353.           archive only if it has been modified more     recently
  354.           than  the     version already in the zip archive.  For
  355.           example:
  356.  
  357.              zip -u stuff *
  358.  
  359.           will add any new files in     the  current  directory,
  360.           and update any files which have been modified since
  361.           the zip archive stuff.zip was last created/modified
  362.  
  363.       (note  that zip will not try to pack stuff.zip into
  364.           itself when you do this).
  365.                          
  366.  
  367.           Note that the -u option with no arguments acts like
  368.           the -f (freshen) option.
  369.  
  370.        -v     Verbose mode or print diagnostic version info.
  371.  
  372.           Normally,     when  applied    to  real operations, this
  373.           option enables the display of a progress    indicator
  374.           during  compression and requests verbose diagnostic
  375.           info about zipfile structure oddities.
  376.  
  377.       When -v is the only command line argument, and std-
  378.           out  is  not  redirected    to  a  file, a diagnostic
  379.           screen is printed. In addition to the  help  screen
  380.           header  with  program  name,  version,  and release
  381.           date, some pointers to the Info-ZIP home    and  dis-
  382.           tribution     sites are given. Then, it shows informa-
  383.           tion about the target  environment  (compiler  type
  384.           and  version,  OS version, compilation date and the
  385.  
  386.       enabled optional features used to     create     the  zip
  387.           executable.
  388.  
  389.        -V     Save  VMS file attributes. This option is available
  390.           on VMS only; zip archives created with this  option
  391.           will generally not be usable on other systems.
  392.  
  393.        -w     Append the version number of the files to the name,
  394.           including multiple versions of files.   (VMS  only;
  395.           default:    use  only  the    most  recent version of a
  396.           specified file).
  397.  
  398.        -x files
  399.           Explicitly exclude the specified files, as in:
  400.  
  401.              -r foo foo -x \*.o
  402.  
  403.           which will include the contents of foo  in  foo.zip
  404.           while  excluding all the files that end in .o.  The
  405.           backslash avoids the shell  filename  substitution,
  406.           so  that    the  name matching is performed by zip at
  407.           all directory levels.
  408.  
  409.           Also possible:
  410.  
  411.             -r foo foo -x@exclude.lst
  412.  
  413.           which will include the contents of foo  in  foo.zip
  414.  
  415.       while  excluding    all the files that match the pat-
  416.           terns in the file exclude.lst.
  417.  
  418.        -X     Do  not  save  extra  file   attributes    (Extended
  419.           Attributes  on  OS/2,  uid/gid  and  file     times on
  420.           Unix).
  421.  
  422.        -y     Store symbolic links as such in  the  zip     archive,
  423.  
  424.           instead    of   compressing  and  storing    the  file
  425.           referred to by the link (UNIX only).
  426.  
  427.        -z     Prompt for a multi-line comment for the entire  zip
  428.  
  429.       archive.    The comment is ended by a line containing
  430.           just a period, or an end of file condition  (^D  on
  431.           UNIX, ^Z on MSDOS, OS/2, and VAX/VMS).  The comment
  432.           can be taken from a file:
  433.  
  434.            -z foo < foowhat
  435.  
  436.        -#     Regulate the speed of compression using the  speci-
  437.           fied  digit  #,  where  -0 indicates no compression
  438.           (store all files), -1 indicates  the  fastest  com-
  439.           pression method (less compression) and -9 indicates
  440.  
  441.       the slowest compression  method  (optimal     compres-
  442.           sion,  ignores  the  suffix list). The default com-
  443.           pression level is -6.
  444.  
  445.        -@     Take the list of input files from     standard  input.
  446.           Only one filename per line.
  447.  
  448.        -$     Include  the volume label for the the drive holding
  449.           the first file to be compressed.    If  you     want  to
  450.           include  only  the  volume label or to force a spe-
  451.           cific drive, use the drive name as first file name,
  452.  
  453.       as in:
  454.  
  455.               -$ foo a: c:bar
  456.  
  457.           This  option  is    effective  on  some  systems only
  458.           (MSDOS and OS/2); it is ignored on Unix.
  459.  
  460.  
  461. Unzip Options
  462.  
  463. OPTIONS
  464.        Note that,  in  order  to  support  obsolescent  hardware,
  465.        unzip's  usage  screen  is  limited  to 22 or 23 lines and
  466.        should therefore be considered  only  a  reminder  of  the
  467.        basic  unzip  syntax rather than an exhaustive list of all
  468.        possible flags.  The exhaustive list follows:
  469.  
  470.        -Z     zipinfo(1L) mode.  If the first option on the  com-
  471.               mand line is -Z, the remaining options are taken to
  472.               be zipinfo(1L) options.  See the appropriate manual
  473.  
  474.               page for a description of these options.
  475.  
  476.        -A     [OS/2,  Unix DLL] print extended help for the DLL's
  477.               programming interface (API).
  478.  
  479.        -c     extract files  to  stdout/screen  (``CRT'').   This
  480.               option  is similar to the -p option except that the
  481.               name of each file is printed as  it  is  extracted,
  482.               the  -a option is allowed, and ASCII-EBCDIC conver-
  483.               sion is  automatically  performed  if  appropriate.
  484.  
  485.               This  option  is  not  listed  in  the  unzip usage
  486.               screen.
  487.  
  488.        -f     freshen existing files, i.e.,  extract  only  those
  489.               files that already exist on disk and that are newer
  490.               than the disk copies.   By  default  unzip  queries
  491.               before  overwriting,  but the -o option may be used
  492.               to suppress the  queries.   Note  that  under  many
  493.               operating  systems,  the  TZ (timezone) environment
  494.  
  495.               variable must be set correctly in order for -f  and
  496.               -u  to  work  properly  (under Unix the variable is
  497.               usually set automatically).  The reasons  for  this
  498.               are somewhat subtle but have to do with the differ-
  499.               ences between DOS-format file times  (always  local
  500.               time) and Unix-format times (always in GMT/UTC) and
  501.               the necessity to compare the  two.   A  typical  TZ
  502.               value  is  ``PST8PDT''  (US Pacific time with auto-
  503.  
  504.               matic  adjustment  for  Daylight  Savings  Time  or
  505.               ``summer time'').
  506.  
  507.        -l     list  archive  files  (short  format).   The names,
  508.               uncompressed file sizes and modification dates  and
  509.               times  of  the  specified  files are printed, along
  510.               with totals for all files specified.  If UnZip  was
  511.               compiled  with  OS2_EAS defined, the -l option also
  512.               lists columns for the sizes of stored OS/2 extended
  513.  
  514.               attributes  (EAs)  and  OS/2  access  control lists
  515.               (ACLs).  In addition, the zipfile comment and indi-
  516.               vidual  file comments (if any) are displayed.  If a
  517.               file was archived from a  single-case  file  system
  518.               (for  example,  the old MS-DOS FAT file system) and
  519.               the -L option was given, the filename is  converted
  520.               to lowercase and is prefixed with a caret (^).
  521.  
  522.        -p     extract  files  to  pipe (stdout).  Nothing but the
  523.  
  524.               file data is sent to  stdout,  and  the  files  are
  525.               always extracted in binary format, just as they are
  526.               stored (no conversions).
  527.  
  528.        -t     test archive  files.   This  option  extracts  each
  529.               specified  file  in  memory  and  compares  the CRC
  530.               (cyclic redundancy check, an enhanced checksum)  of
  531.               the  expanded  file with the original file's stored
  532.               CRC value.
  533.  
  534.        -T     [most OSes] set the timestamp on the archive(s)  to
  535.  
  536.               that  of  the newest file in each one.  This corre-
  537.               sponds to zip's -go option except that  it  can  be
  538.               used   on   wildcard  zipfiles  (e.g.,  ``unzip  -T
  539.               \*.zip'') and is much faster.
  540.  
  541.        -u     update  existing  files  and  create  new  ones  if
  542.               needed.   This option performs the same function as
  543.               the -f option, extracting (with query)  files  that
  544.               are  newer  than  those with the same name on disk,
  545.  
  546.               and in addition it extracts those files that do not
  547.               already  exist  on disk.  See -f above for informa-
  548.               tion on setting the timezone properly.
  549.  
  550.        -v     be verbose or print diagnostic version info.   This
  551.               option  has  evolved  and  now  behaves  as both an
  552.               option and a modifier.  As an  option  it  has  two
  553.               purposes:   when  a  zipfile  is  specified with no
  554.               other options, -v lists  archive  files  verbosely,
  555.  
  556.               adding to the basic -l info the compression method,
  557.               compressed size, compression ratio and 32-bit  CRC.
  558.               When no zipfile is specified (that is, the complete
  559.               command  is  simply  ``unzip  -v''),  a  diagnostic
  560.               screen  is  printed.   In  addition  to  the normal
  561.               header with release date and version,  unzip  lists
  562.               the home Info-ZIP ftp site and where to find a list
  563.               of other ftp and non-ftp sites; the target  operat-
  564.  
  565.               ing  system  for  which it was compiled, as well as
  566.               (possibly) the hardware on which it  was  compiled,
  567.               the  compiler and version used, and the compilation
  568.               date; any special compilation  options  that  might
  569.               affect the program's operation (see also DECRYPTION
  570.               below); and any options stored in environment vari-
  571.               ables  that  might  do  the  same  (see ENVIRONMENT
  572.               OPTIONS below).  As a modifier it works in conjunc-
  573.  
  574.               tion  with other options (e.g., -t) to produce more
  575.               verbose or debugging output; this is not yet  fully
  576.               implemented but will be in future releases.
  577.  
  578.        -z     display only the archive comment.
  579.  
  580. MODIFIERS
  581.        -a     convert  text  files.   Ordinarily  all  files  are
  582.               extracted exactly as they are stored (as ``binary''
  583.               files).   The  -a option causes files identified by
  584.               zip as text files (those with the `t' label in zip-
  585.  
  586.               info listings, rather than `b') to be automatically
  587.               extracted as such, converting line endings, end-of-
  588.               file  characters  and  the  character set itself as
  589.               necessary.  (For example, Unix files use line feeds
  590.               (LFs) for end-of-line (EOL) and have no end-of-file
  591.               (EOF)  marker;  Macintoshes  use  carriage  returns
  592.               (CRs)  for  EOLs; and most PC operating systems use
  593.               CR+LF for EOLs and control-Z for EOF.  In addition,
  594.  
  595.               IBM mainframes and the Michigan Terminal System use
  596.               EBCDIC rather than the more common ASCII  character
  597.               set,  and  NT  supports  Unicode.)  Note that zip's
  598.               identification  of  text  files  is  by  no   means
  599.  
  600.               perfect; some ``text'' files may actually be binary
  601.               and vice versa.  unzip therefore prints  ``[text]''
  602.               or  ``[binary]'' as a visual check for each file it
  603.               extracts when using the -a option.  The -aa  option
  604.  
  605.               forces  all  files to be extracted as text, regard-
  606.               less of the supposed file type.
  607.  
  608.        -b     [non-VMS] treat all files as binary (no  text  con-
  609.               versions).  This is a shortcut for ---a.
  610.  
  611.        -b     [VMS]  auto-convert  binary files (see -a above) to
  612.               fixed-length, 512-byte record format.  Doubling the
  613.               option  (-bb)  forces  all files to be extracted in
  614.               this format.
  615.  
  616.        -B     [Unix only, and only if  compiled  with  UNIXBACKUP
  617.  
  618.               defined]  save  a  backup  copy of each overwritten
  619.               file with a tilde appended (e.g., the old  copy  of
  620.               ``foo''  is  renamed to ``foo~'').  This is similar
  621.               to the default behavior of emacs(1) in  many  loca-
  622.               tions.
  623.  
  624.  
  625.        -C     match  filenames  case-insensitively.  unzip's phi-
  626.               losophy is ``you get what you ask  for''  (this  is
  627.               also responsible for the -L/-U change; see the rel-
  628.  
  629.               evant options below).  Because  some  file  systems
  630.               are  fully  case-sensitive (notably those under the
  631.               Unix  operating  system)  and  because   both   ZIP
  632.               archives and unzip itself are portable across plat-
  633.               forms, unzip's default behavior is  to  match  both
  634.               wildcard  and  literal  filenames case-sensitively.
  635.               That is, specifying  ``makefile''  on  the  command
  636.               line  will  only match ``makefile'' in the archive,
  637.  
  638.               not ``Makefile'' or ``MAKEFILE'' (and similarly for
  639.               wildcard specifications).  Since this does not cor-
  640.               respond to  the  behavior  of  many  other  operat-
  641.               ing/file  systems  (for  example,  OS/2 HPFS, which
  642.               preserves mixed case but is not sensitive  to  it),
  643.               the  -C  option  may  be used to force all filename
  644.               matches to be  case-insensitive.   In  the  example
  645.               above,  all  three  files  would then match ``make-
  646.  
  647.               file'' (or ``make*'', or similar).  The  -C  option
  648.               affects  files in both the normal file list and the
  649.               excluded-file list (xlist).
  650.  
  651.        -j     junk paths.  The archive's directory  structure  is
  652.               not  recreated;  all  files  are  deposited  in the
  653.               extraction directory (by default, the current one).
  654.  
  655.        -L     convert to lowercase any filename originating on an
  656.               uppercase-only operating  system  or  file  system.
  657.  
  658.               (This  was  unzip's  default  behavior  in releases
  659.               prior to 5.11; the new default behavior is  identi-
  660.               cal  to  the old behavior with the -U option, which
  661.  
  662.               is now obsolete and will be  removed  in  a  future
  663.               release.)    Depending   on   the  archiver,  files
  664.               archived under single-case file systems  (VMS,  old
  665.               MS-DOS  FAT,  etc.)  may be stored as all-uppercase
  666.               names;  this  can  be  ugly  or  inconvenient  when
  667.  
  668.               extracting to a case-preserving file system such as
  669.               OS/2 HPFS or a case-sensitive  one  such  as  under
  670.               Unix.   By  default  unzip  lists and extracts such
  671.               filenames  exactly  as  they're  stored  (excepting
  672.               truncation,  conversion  of unsupported characters,
  673.               etc.); this option causes the names  of  all  files
  674.               from  certain systems to be converted to lowercase.
  675.  
  676.        -M     pipe all output through an internal  pager  similar
  677.  
  678.               to  the  Unixmore(1)  command.   At  the  end  of a
  679.               screenful  of   output,   unzip   pauses   with   a
  680.               ``--More--''  prompt;  the  next  screenful  may be
  681.               viewed by pressing the Enter (Return)  key  or  the
  682.               space bar.  unzip can be terminated by pressing the
  683.               ``q'' key and, on some  systems,  the  Enter/Return
  684.               key.   Unlike  Unix  more(1),  there is no forward-
  685.               searching  or  editing  capability.   Also,   unzip
  686.  
  687.               doesn't  notice  if  long lines wrap at the edge of
  688.               the screen, effectively resulting in  the  printing
  689.               of  two  or more lines and the likelihood that some
  690.               text will scroll off the top of the  screen  before
  691.               being viewed.  On some systems the number of avail-
  692.               able lines on the screen is not detected, in  which
  693.               case unzip assumes the height is 24 lines.
  694.  
  695.        -n     never  overwrite existing files.  If a file already
  696.  
  697.               exists, skip the extraction of  that  file  without
  698.               prompting.    By   default   unzip  queries  before
  699.               extracting any file that already exists;  the  user
  700.               may  choose  to  overwrite  only  the current file,
  701.               overwrite all files, skip extraction of the current
  702.               file,  skip  extraction  of  all existing files, or
  703.               rename the current file.
  704.  
  705.        -N     [Amiga] extract file comments as  Amiga  filenotes.
  706.  
  707.               File  comments  are  created  with the -c option of
  708.               zip(1L), or with the -N option of the Amiga port of
  709.               zip(1L), which stores filenotes as comments.
  710.  
  711.        -o     overwrite  existing  files without prompting.  This
  712.               is a dangerous option, so use it with care.  (It is
  713.               often used with -f, however, and is the only way to
  714.               overwrite directory EAs under OS/2.)
  715.  
  716.        -q     perform operations quietly (-qq  =  even  quieter).
  717.               Ordinarily unzip prints the names of the files it's
  718.               extracting or testing, the extraction methods,  any
  719.               file  or zipfile comments that may be stored in the
  720.  
  721.               archive, and possibly a summary when finished  with
  722.               each  archive.   The  -q[q]  options  suppress  the
  723.               printing of some or all of these messages.
  724.  
  725.        -s     [OS/2, NT, MS-DOS] convert spaces in  filenames  to
  726.               underscores.   Since all PC operating systems allow
  727.               spaces in  filenames,  unzip  by  default  extracts
  728.               filenames     with     spaces     intact     (e.g.,
  729.               ``EA DATA. SF'').  This can  be  awkward,  however,
  730.  
  731.               since MS-DOS in particular does not gracefully sup-
  732.               port spaces in filenames.  Conversion of spaces  to
  733.               underscores  can  eliminate the awkwardness in some
  734.               cases.
  735.  
  736.        -U     (obsolete; to be removed in a future release) leave
  737.               filenames  uppercase  if created under MS-DOS, VMS,
  738.               etc.  See -L above.
  739.  
  740.        -V     retain (VMS) file version numbers.  VMS  files  can
  741.               be  stored  with  a  version  number, in the format
  742.  
  743.               file.ext;##.  By default the ``;##''  version  num-
  744.               bers  are  stripped, but this option allows them to
  745.               be retained.  (On file systems that limit filenames
  746.               to  particularly short lengths, the version numbers
  747.               may be truncated or  stripped  regardless  of  this
  748.               option.)
  749.  
  750.        -X     [VMS, Unix, OS/2, NT] restore owner/protection info
  751.               (UICs) under VMS, or user and group info  (UID/GID)
  752.  
  753.               under  Unix,  or  access control lists (ACLs) under
  754.               certain  network-enabled  versions  of  OS/2  (Warp
  755.               Server  with  IBM  LAN Server/Requester 3.0 to 5.0;
  756.               Warp Connect with IBM Peer 1.0), or  security  ACLs
  757.               under  Windows NT.  In most cases this will require
  758.               special system privileges, and doubling the  option
  759.               (-XX)  under  NT  instructs unzip to use privileges
  760.               for extraction; but under Unix, for example, a user
  761.  
  762.               who  belongs  to  several  groups can restore files
  763.               owned by any of those groups, as long as  the  user
  764.  
  765.               IDs  match his or her own.  Note that ordinary file
  766.               attributes are always restored--this option applies
  767.               only to optional, extra ownership info available on
  768.               some operating systems.  [NT's access control lists
  769.               do  not  appear  to  be  especially compatible with
  770.               OS/2's, so no attempt  is  made  at  cross-platform
  771.  
  772.               portability  of access privileges.  It is not clear
  773.               under what conditions this  would  ever  be  useful
  774.               anyway.]
  775.  
  776.        -$     [MS-DOS,  OS/2, NT] restore the volume label if the
  777.               extraction medium is removable (e.g., a  diskette).
  778.               Doubling  the option (-$$) allows fixed media (hard
  779.               disks) to be labelled as well.  By default,  volume
  780.               labels are ignored.